home *** CD-ROM | disk | FTP | other *** search
- From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
- Date: Tue, 17 May 94 11:49:50 +0200
- Message-Id: <9405170949.AA04469@issan.informatik.uni-dortmund.de>
- To: mint@atari.archive.umich.edu
- Subject: MiNT 1.10: bug in p_waitpid
-
- When a process exits both its own and its children's process time
- should be added to the parent's children time. Also the time reported
- as resource usage should include the children's time.
-
- --- orig/dosmem.c Wed Feb 2 23:43:02 1994
- +++ dosmem.c Mon May 16 19:28:48 1994
- @@ -1094,16 +1094,16 @@
-
- /* check resource usage */
- if (rusage) {
- - *rusage++ = p->usrtime;
- - *rusage = p->systime;
- + *rusage++ = p->usrtime + p->chldutime;
- + *rusage = p->systime + p->chldstime;
- }
-
- /* avoid adding adopted trace processes usage to the foster parent */
- if (curproc->pid == p->ppid) {
- /* add child's resource usage to parent's */
- if (p->wait_q == TSR_Q || p->wait_q == ZOMBIE_Q) {
- - curproc->chldstime += p->systime;
- - curproc->chldutime += p->usrtime;
- + curproc->chldstime += p->systime + p->chldstime;
- + curproc->chldutime += p->usrtime + p->chldutime;
- }
- }
-
- --
- +------------------------------------------------------------------------+
- Andreas Schwab "And now for something
- schwab@ls5.informatik.uni-dortmund.de completely different"
- * Linux/Atari is coming real soon now, stay tuned *
-